using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DownLoadPackageRequest : GeneratedMessageLite<DownLoadPackageRequest, DownLoadPackageRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DownLoadPackageRequest, DownLoadPackageRequest.Builder>
		{
			private bool resultIsReadOnly;
			private DownLoadPackageRequest result;
			protected override DownLoadPackageRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DownLoadPackageRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DownLoadPackageRequest DefaultInstanceForType
			{
				get
				{
					return DownLoadPackageRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public Package Package
			{
				get
				{
					return this.result.Package;
				}
				set
				{
					this.SetPackage(value);
				}
			}
			public uint Offset
			{
				get
				{
					return this.result.Offset;
				}
				set
				{
					this.SetOffset(value);
				}
			}
			public uint Len
			{
				get
				{
					return this.result.Len;
				}
				set
				{
					this.SetLen(value);
				}
			}
			public uint Type
			{
				get
				{
					return this.result.Type;
				}
				set
				{
					this.SetType(value);
				}
			}
			public Builder()
			{
				this.result = DownLoadPackageRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DownLoadPackageRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DownLoadPackageRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DownLoadPackageRequest other = this.result;
					this.result = new DownLoadPackageRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DownLoadPackageRequest.Builder Clear()
			{
				this.result = DownLoadPackageRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DownLoadPackageRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DownLoadPackageRequest.Builder(this.result);
				}
				return new DownLoadPackageRequest.Builder().MergeFrom(this.result);
			}
			public override DownLoadPackageRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DownLoadPackageRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is DownLoadPackageRequest)
				{
					return this.MergeFrom((DownLoadPackageRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DownLoadPackageRequest.Builder MergeFrom(DownLoadPackageRequest other)
			{
				return this;
			}
			public override DownLoadPackageRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DownLoadPackageRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DownLoadPackageRequest._downLoadPackageRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DownLoadPackageRequest._downLoadPackageRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 18u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
						if (num3 == 18u)
						{
							Package.Builder builder2 = Package.CreateBuilder();
							if (this.result.hasPackage)
							{
								builder2.MergeFrom(this.Package);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.Package = builder2.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 24u)
						{
							this.result.hasOffset = input.ReadUInt32(ref this.result.offset_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasLen = input.ReadUInt32(ref this.result.len_);
							continue;
						}
						if (num3 == 40u)
						{
							this.result.hasType = input.ReadUInt32(ref this.result.type_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public DownLoadPackageRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public DownLoadPackageRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public DownLoadPackageRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public DownLoadPackageRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public DownLoadPackageRequest.Builder SetPackage(Package value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasPackage = true;
				this.result.package_ = value;
				return this;
			}
			public DownLoadPackageRequest.Builder SetPackage(Package.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasPackage = true;
				this.result.package_ = builderForValue.Build();
				return this;
			}
			public DownLoadPackageRequest.Builder MergePackage(Package value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasPackage && this.result.package_ != Package.DefaultInstance)
				{
					this.result.package_ = Package.CreateBuilder(this.result.package_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.package_ = value;
				}
				this.result.hasPackage = true;
				return this;
			}
			public DownLoadPackageRequest.Builder ClearPackage()
			{
				this.PrepareBuilder();
				this.result.hasPackage = false;
				this.result.package_ = null;
				return this;
			}
			public DownLoadPackageRequest.Builder SetOffset(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOffset = true;
				this.result.offset_ = value;
				return this;
			}
			public DownLoadPackageRequest.Builder ClearOffset()
			{
				this.PrepareBuilder();
				this.result.hasOffset = false;
				this.result.offset_ = 0u;
				return this;
			}
			public DownLoadPackageRequest.Builder SetLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasLen = true;
				this.result.len_ = value;
				return this;
			}
			public DownLoadPackageRequest.Builder ClearLen()
			{
				this.PrepareBuilder();
				this.result.hasLen = false;
				this.result.len_ = 0u;
				return this;
			}
			public DownLoadPackageRequest.Builder SetType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasType = true;
				this.result.type_ = value;
				return this;
			}
			public DownLoadPackageRequest.Builder ClearType()
			{
				this.PrepareBuilder();
				this.result.hasType = false;
				this.result.type_ = 0u;
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int PackageFieldNumber = 2;
		public const int OffsetFieldNumber = 3;
		public const int LenFieldNumber = 4;
		public const int TypeFieldNumber = 5;
		private static readonly DownLoadPackageRequest defaultInstance;
		private static readonly string[] _downLoadPackageRequestFieldNames;
		private static readonly uint[] _downLoadPackageRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasPackage;
		private Package package_;
		private bool hasOffset;
		private uint offset_;
		private bool hasLen;
		private uint len_;
		private bool hasType;
		private uint type_;
		private int memoizedSerializedSize = -1;
		public static DownLoadPackageRequest DefaultInstance
		{
			get
			{
				return DownLoadPackageRequest.defaultInstance;
			}
		}
		public override DownLoadPackageRequest DefaultInstanceForType
		{
			get
			{
				return DownLoadPackageRequest.DefaultInstance;
			}
		}
		protected override DownLoadPackageRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public Package Package
		{
			get
			{
				return this.package_ ?? Package.DefaultInstance;
			}
		}
		public uint Offset
		{
			get
			{
				return this.offset_;
			}
		}
		public uint Len
		{
			get
			{
				return this.len_;
			}
		}
		public uint Type
		{
			get
			{
				return this.type_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasPackage && this.hasOffset && this.hasLen && this.BaseRequest.IsInitialized && this.Package.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasPackage)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.Package);
				}
				if (this.hasOffset)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.Offset);
				}
				if (this.hasLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.Len);
				}
				if (this.hasType)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.Type);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DownLoadPackageRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] downLoadPackageRequestFieldNames = DownLoadPackageRequest._downLoadPackageRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, downLoadPackageRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasPackage)
			{
				output.WriteMessage(2, downLoadPackageRequestFieldNames[3], this.Package);
			}
			if (this.hasOffset)
			{
				output.WriteUInt32(3, downLoadPackageRequestFieldNames[2], this.Offset);
			}
			if (this.hasLen)
			{
				output.WriteUInt32(4, downLoadPackageRequestFieldNames[1], this.Len);
			}
			if (this.hasType)
			{
				output.WriteUInt32(5, downLoadPackageRequestFieldNames[4], this.Type);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasPackage)
			{
				num ^= this.package_.GetHashCode();
			}
			if (this.hasOffset)
			{
				num ^= this.offset_.GetHashCode();
			}
			if (this.hasLen)
			{
				num ^= this.len_.GetHashCode();
			}
			if (this.hasType)
			{
				num ^= this.type_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			DownLoadPackageRequest downLoadPackageRequest = value as DownLoadPackageRequest;
			return downLoadPackageRequest != null && (this.hasBaseRequest == downLoadPackageRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(downLoadPackageRequest.baseRequest_))) && (this.hasPackage == downLoadPackageRequest.hasPackage && (!this.hasPackage || this.package_.Equals(downLoadPackageRequest.package_))) && (this.hasOffset == downLoadPackageRequest.hasOffset && (!this.hasOffset || this.offset_.Equals(downLoadPackageRequest.offset_))) && (this.hasLen == downLoadPackageRequest.hasLen && (!this.hasLen || this.len_.Equals(downLoadPackageRequest.len_))) && (this.hasType == downLoadPackageRequest.hasType && (!this.hasType || this.type_.Equals(downLoadPackageRequest.type_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DownLoadPackageRequest, DownLoadPackageRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<DownLoadPackageRequest, DownLoadPackageRequest.Builder>.PrintField("Package", this.hasPackage, this.package_, writer);
			GeneratedMessageLite<DownLoadPackageRequest, DownLoadPackageRequest.Builder>.PrintField("Offset", this.hasOffset, this.offset_, writer);
			GeneratedMessageLite<DownLoadPackageRequest, DownLoadPackageRequest.Builder>.PrintField("Len", this.hasLen, this.len_, writer);
			GeneratedMessageLite<DownLoadPackageRequest, DownLoadPackageRequest.Builder>.PrintField("Type", this.hasType, this.type_, writer);
		}
		public static DownLoadPackageRequest ParseFrom(byte[] data)
		{
			return DownLoadPackageRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DownLoadPackageRequest MakeReadOnly()
		{
			return this;
		}
		public static DownLoadPackageRequest.Builder CreateBuilder()
		{
			return new DownLoadPackageRequest.Builder();
		}
		public override DownLoadPackageRequest.Builder ToBuilder()
		{
			return DownLoadPackageRequest.CreateBuilder(this);
		}
		public override DownLoadPackageRequest.Builder CreateBuilderForType()
		{
			return new DownLoadPackageRequest.Builder();
		}
		public static DownLoadPackageRequest.Builder CreateBuilder(DownLoadPackageRequest prototype)
		{
			return new DownLoadPackageRequest.Builder(prototype);
		}
		static DownLoadPackageRequest()
		{
			DownLoadPackageRequest.defaultInstance = new DownLoadPackageRequest().MakeReadOnly();
			DownLoadPackageRequest._downLoadPackageRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Len",
				"Offset",
				"Package",
				"Type"
			};
			DownLoadPackageRequest._downLoadPackageRequestFieldTags = new uint[]
			{
				10u,
				32u,
				24u,
				18u,
				40u
			};
			object.ReferenceEquals(micromsg.Proto.DownLoadPackageRequest.Descriptor, null);
		}
	}
}
